//
// Created by 1065246 on 2023/3/31.
//

#ifndef BASE_PEOPLE_H
#define BASE_PEOPLE_H

#include <string>
#include "MyParent.cpp"

using namespace std;

class People: public MyParent{
public:
    //定义有参构造函数
    People(int paAge, string name, int age);


    //定义具有常量成员的有参构造函数
    People(string name, int age,string parent);

    friend void sayPeopleSelf(People & people);

    void peopleMsg();

    int getAge();
private:
    int age;
    string name;
    //常量成员变量只能用初始化列表初始化
    const string parent;
};

#endif //BASE_PEOPLE_H
